#!/bin/bash
#A key to install lamp platform
ROOT_UID=0
if [ "$UID" -ne "ROOT_UID" ]; then
echo "must be root run this csript"
exit 1
fi
echo "
|-------------------------------------------------------------|"
echo "
|***********************|-Wang YunLong |**********************|"
echo "
|***********************|Install Script|**********************|"
echo "
|-------------------------------------------------------------|"
menu(){
cat << END
-------------------------------
| ** (1).[install lamp] ** |
| ** (2).[install lnmp] ** |
| ** (3).[install nfs ] ** |
| ** (4).[install rsync] ** |
----------------------------------------------------------------
|*************Please Enter Your Choice:[ 0-4]******************|
----------------------------------------------------------------
END
}
menu
read -t 20 -p "****---^_^---****: " a
echo "you selected $a"
case $a in
1)
echo "
|=====================**Make Install Lamp**========================|"
;;
2)
echo " 
|=====================**Make Install Lnmp**========================|"
;;
3)
echo "
|=====================**Make Install Nfs**=========================|"
;;
4)
echo "
|=====================**Make Install Rsync**=======================|"
;;
*)
echo " 
--------------------------------------------------------------------
|******************Please Input 1|2|3|4 ***************************|
--------------------------------------------------------------------"
;;
esac
[ $a -eq 1 ]&&{
cat <<END
|------------------------------------------------------------------|
| ** [1.install lamp] ** |
| ** [2.install apache]** |
| ** [3.install mysql] ** |
| ** [4.install php] ** |
|------------------------------------------------------------------|
END
}
read -t 20 -p "****---^_^---****:" b
echo "you selecter $b"
case $b in
1)
echo "
|=====================**Make install Apach**========================| "
;;
2)
echo " 
|======================**Make install Mysql**=======================|"
;;
3)
echo "
|====================**Make install PHP**===========================|"
;;
*)
echo "
-------------------------------------------------------------------------------------------
|***************Please Input 1|2|3|4 *******************************|
-------------------------------------------------------------------------------------------
"
;;
esac
